# -*- codeing = utf-8 -*-
# @Time : 2021/2/26 10:09
# @Atuthor: 朱朱
# @File: 108内置属性.py
# @Software: PyCharm
class Person(object):
    """
    好吧,我是doc
    """
    __slots__ = ('name','age') # 规定了只能动态设置的属性

    def __init__(self, name, age):
        self.name = name
        self.age = age

    def eat(self):
        print(self.name + '正在吃饭啊....')

p = Person('zhangsan', 18)
print(dir(p))
print(p.__class__) # <class '__main__.Person'>
# print(p.__dict__)
print(p.__dir__())
print(p.__doc__)
print(p.__module__) # __main__ 当前操作的对象所属的模块

